package cn.kgc.springloudalibaba.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: mosin
 * @version: v1.0  2023/1/9
 */
@RestController
@RequestMapping("config")
@RefreshScope   //  实现数据的自动刷新
public class ConfigClientController {

    @Value("${name}")
    private String name;

    @RequestMapping("m1")
    public String method1(){
        return  "ConfigClientController ok name = "+ name;
    }
}
